import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        RuleData data = new RuleData();
        data.setAge(10);
        data.setName("yuwenrong");

        List<BaseRule> ruleList = new ArrayList<>();

        BaseRule rule1 = new MyRuleName(data);
        ruleList.add(rule1);
        BaseRule rule2 = new MyRuleAge(data);
        ruleList.add(rule2);

        RuleExecutor executor = new RuleExecutor();
        executor.and(ruleList);
        Boolean result = executor.executeRule(data);

        System.out.println(result);


    }
}